﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="VMuktiGrid.CustomMenu.ctlExpMenuItem"
    Height="Auto" Background="{x:Null}" FontSize="18" Foreground="{x:Null}" 
    xmlns:nmBuddy="clr-namespace:VMuktiGrid.Buddy"
    HorizontalAlignment="Stretch" Padding="0,0,0,5" >
    
    <UserControl.Resources>
        <Storyboard x:Key="OnMouseOver">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitle" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFF7F7"/>
                <SplineColorKeyFrame KeyTime="00:00:00.2600000" Value="#FFE18926"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnMoudeLeft">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="txtTitle">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE18926"/>
                <SplineColorKeyFrame KeyTime="00:00:00.4600000" Value="#FF000000"/>
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="Black"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <!--<Storyboard x:Key="OnMouseClick">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitle" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFFFFF"/>
                <SplineColorKeyFrame KeyTime="00:00:00.6000000" Value="#FFFFFFFF"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>-->
    </UserControl.Resources>
    
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="txtTitle">
            <BeginStoryboard Storyboard="{StaticResource OnMouseOver}" x:Name="OnMouseOver_BeginStoryboard"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMoudeLeft_BeginStoryboard" Storyboard="{StaticResource OnMoudeLeft}"/>
        </EventTrigger>
        <!--<EventTrigger RoutedEvent="Mouse.MouseDown" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMouseClick_BeginStoryboard" Storyboard="{StaticResource OnMouseClick}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseDown" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMouseUp_BeginStoryboard1" Storyboard="{StaticResource OnMouseOver}"/>
        </EventTrigger>-->
    </UserControl.Triggers>

    <Grid x:Name="LayoutRoot" Width="Auto" HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="16" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Name="rowFirst" />
            <RowDefinition Name="rowSecond" Height="Auto" />
        </Grid.RowDefinitions>

        <Button x:Name="btnPopUP" Width="16" Content="" Style="{DynamicResource ArrowButtons}" 
                RenderTransformOrigin="0.5,0.5" Foreground="{x:Null}" Focusable="False" HorizontalAlignment="Right" 
                Height="10" Margin="0,0,0,0" Cursor="Hand" Click="btnPopUP_Click" Grid.Column="0">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="-1" ScaleY="1"/>
                    <SkewTransform AngleX="0" AngleY="0"/>
                    <RotateTransform Angle="-90"/>
                    <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>
        <TextBlock x:Name="txtTitle" FontFamily="Berlin Sans FB" FontSize="14" Foreground="Black" Text="TextBlock" TextWrapping="Wrap" 
                   Cursor="Hand" Width="Auto" Height="20" Padding="3,3,3,0" FontWeight="Normal" Background="{x:Null}" 
                   PreviewMouseLeftButtonDown="txtTitle_PreviewMouseLeftButtonDown" HorizontalAlignment="Stretch" Grid.Column="1"/>
        <Image x:Name="imgRightIcon" Width="16" Stretch="Uniform" StretchDirection="Both" Height="20" Grid.Column="2" />
        
        <Border HorizontalAlignment="Stretch" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#B2515151" Offset="0"/>
                    <GradientStop Color="#80FFFFFF" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>
        
        <!--<Border HorizontalAlignment="Left" Width="16" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="0" Grid.Row="0">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#00515151" Offset="0"/>
                    <GradientStop Color="#B2515151" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>
        <Border HorizontalAlignment="Left" Margin="2,0,2,0" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="1" Grid.Row="0">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#B2515151" Offset="0"/>
                    <GradientStop Color="#80FFFFFF" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>
        <Border HorizontalAlignment="Right" Width="16" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="2" Grid.Row="0">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#00515151" Offset="0"/>
                    <GradientStop Color="#B2515151" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>-->

        <nmBuddy:ctlBuddyList x:Name="objBuddyList" Height="Auto" MaxHeight="200" Grid.Row="1" Grid.Column="1" Width="Auto" Grid.ColumnSpan="2" Visibility="Collapsed" />
    </Grid>
</UserControl>
